<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>配送关系日志查看</title>
<%@ include file="/WEB-INF/component/commonCSS.jsp"%>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1>配送关系日志查看</h1>
        <ol class="breadcrumb">
            <li><a href=""><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="#">配送关系查看</a></li>
            <li class="active"><a href="#">配送关系日志查看</a></li>
        </ol>
    </section>
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <div class="form-inline">
                    <div class="form-group form-group-xs">
                        <label for="searchPharCode">日期:</label>
                        <input class="form-control" type="text" id="startTime" readonly="readonly" placeholder="开始日期" maxlength="10" data-provide="datepicker" data-date-fmt="yyyy-MM-dd" />
                        -
                        <input class="form-control" type="text" id="endTime" readonly="readonly" placeholder="结束日期" maxlength="10" data-provide="datepicker" data-date-fmt="yyyy-MM-dd" />
                    </div>
                    <button type="button" class="btn btn-success btn-sm" onclick="search();">查&nbsp;询</button>
                </div>
            </div>
        </div>
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
        <div class=" box box-warning bottongroup">
            <label  onclick="window.location.href='${ctx}/baseDel/toBaseDelByCentreListSee.html'"   class="btn btn-default btn-sm" >返 回</label>
        </div>
    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
        $(function () {
            $("#gridlist").jqGrid({
                url: "getBaseDelrelationByCentreListLog.html?delRelId=${delRelId}",
                mtype: "POST",
                datatype: "json",
                autowidth: true,
                height: 255,
                colNames: ['商品编码','地区编码', '更新时间', '更新人'],
                colModel: [
                    { name: 'goodsCode', align:"center" },
                    { name: 'areaCode', align:"center" },
                    { name: 'updDatetimeStr' ,align:"center"},
                    { name: 'updUser', align:"center" }
                ],
                rowNum: 10,
                rowList: [10, 20, 50, 100],
                rownumbers: true,
                pager: "#gridpage",
                viewrecords: true,
                caption: "配送关系查看",
                jsonReader: {
                    repeatitems: false,
                    id: ""
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");
        });
        
        function search() {
            
            var startTime = $("#startTime").val();
            if (startTime != null && "" != startTime) {
                startTime += " 00:00:00";
            }
            
            var endTime = $("#endTime").val();
            if (endTime != null && "" != endTime) {
                endTime +=  " 23:59:59";
            }
            
            $("#gridlist").jqGrid('setGridParam',{  
                datatype:'json',
                postData:{
                    "startTime":startTime,
                    "endTime":endTime
                },
                page : 1
            }).trigger("reloadGrid"); //重新载入  
        }
    </script>
</body>
</html>